import React from 'react';
import MusicListItem from '../components/musicListItem'

let MusicList = React.createClass({
	render(){
		let listEle = null;
		listEle = this.props.musicList.map((item) => {
			return (
				<MusicListItem musicItem={item} key={item.id} focus={item === this.props.currentMusicItem} >{item.title}</MusicListItem>
			)
		});

		return(
			<ul>
				{listEle}
			</ul>
		)
	}
});

export default MusicList;